package be.kuleuven.cs.mop.domain.repositories;


import java.util.List;



/**
 * Represents a database system
 */
public interface Repository<T> {
	
	/**
	 * Attempts to add the specified element to the <code>Repository</code>
	 * @param e - the element to add
	 * @return TRUE if the element was added, FALSE otherwise
	 */
	public boolean add(final T e);
	
	/**
	 * Determines whether or not the specified element
	 * 	is in the <code>Repository</code>
	 * @param e - the element to look for
	 */
	public boolean contains(final T e);
	
	/**
	 * Returns a <code>List</code> with all the elements
	 * 	in the <code>Repository</code>
	 */
	public List<T> getList();
	
	/**
	 * Attempts to remove the specified element to the <code>Repository</code>
	 * @param e - the element to remove
	 * @return TRUE if the element was removed, FALSE otherwise
	 */
	public boolean remove(final T e);
	
}